package com.tebiecloud.sso.ui.controller;

import com.tebiecloud.common.security.SecurityHelper;
import com.tebiecloud.common.security.SecurityUserDetails;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @Author: tebie
 * @Date: 2019-09-04 10:48
 */
@Controller
public class IndexController {

    /**
     * 欢迎页
     * @param modelMap
     * @return
     */
    @GetMapping("/")
    public String index(ModelMap modelMap) {
        SecurityUserDetails user = SecurityHelper.getUser();
        modelMap.put("user", user);
        return "index";
    }

}
